  <link rel="stylesheet" href="http://static.kb.itttq.com/layui/css/layui.css">
  <link rel="stylesheet" href="http://static.kb.itttq.com/css/global.css">
</head>
<body>

<div class="header">
  <div class="main">
    <a class="logo" href="/" title="Fly">甜甜圈</a>
    <div class="nav">
      <a <#if catId?if_exists><#else>class="nav-this"</#if> href="/index.html">
        <i class="iconfont icon-room"></i>首页
      </a>
      <a <#if catId?if_exists && catId==1>class="nav-this"</#if>href="/topic/1/index.html">
        <i class="iconfont icon-wenda"></i>问答
      </a>
      <a <#if catId?if_exists && catId==2>class="nav-this"</#if>href="/topic/2/index.html" >
        <i class="iconfont icon-shijian"></i>知识
      </a>
      <a <#if catId?if_exists && catId==3>class="nav-this"</#if>href="/topic/3/index.html" >
        <i class="iconfont icon-shichang"></i>词条
      </a>
    </div>
    
    <div class="nav-user">
      <#if user?if_exists && user.id?if_exists>
      <!-- 登入后的状态 -->
      <a class="avatar" href="/user/index.html">
        <img src="<#if user.avatar?if_exists>${(user.avatar)!""}<#else>http://img.kb.itttq.com/avatar/default.png</#if>">
        <cite>${(user.name)!""}</cite>
      </a>
      <div class="nav">
        <a href="/user/set.html"><i class="iconfont icon-shezhi"></i>设置</a>
        <a href="/user/logout/"><i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>告退</a>
      </div>
      <#else>
      <!-- 未登入状态 -->
      <a class="unlogin" href="/login.html"><i class="iconfont icon-touxiang"></i></a>
      <span><a href="/login.html">登入</a><a href="/reg.html">注册</a></span>
      </#if>
      <!-- 
      <p class="out-login">
        <a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq" title="QQ登入"></a>
        <a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo" title="微博登入"></a>
      </p>   
       -->
    </div>
  </div>
</div>